// 获取会议ID
function getConferenceId(src) {
    console.log(src);
    var qs = src.split('?')[1];
    var args = {};
    var items = qs.length ? qs.split('&') : [];
    var len = items.length;
    if (qs.length == 0) {
        // alert("没有查询字符串,退出！");
        return;
    }
    for (var i = 0; i < len; i++) {
        var item = items[i].split("=");
        args[decodeURIComponent(item[0])] = decodeURIComponent(item[1]);
    }
    var data = {
        conferenceId:args['conferenceId'],
        projectId:args['projectId']
    };
    console.log(args['conferenceId'])
    return data;
};
var pWindow = window.parent;
var sSrc = $('#main-content iframe', pWindow.document).attr('src');
var id = getConferenceId(sSrc);    // 会议id
console.log(id.conferenceId)
$(function () {
});

var vm = new Vue({
	el:'#rrapp',
	data:{
		showList: true,
		title: null,
		conferenceAccessory: {},
        conferenceAccessoryList:[],
        conferenceMesgAccessoryList:[]
	},
	methods: {
        getInfo: function () {
            $.get(baseURL + "generator/conferencesummary/queryDetailsMeeting/" + id.conferenceId, {token: token}, function (r) {
                console.log(r);
                vm.conferenceAccessory = r.conferenceAccessory;
                vm.conferenceAccessoryList = r.conferenceAccessory.conferenceAccessoryList;
                vm.conferenceMesgAccessoryList = r.conferenceAccessory.conferenceMesgAccessoryList;
                console.log(vm.conferenceAccessory);
            });
        },
        //返回
        reload: function () {
            var pWindow = window.parent;
            // 改变首页的 indexVm 的 data，触发 updated
            pWindow.indexVm.main = 'modules/project/projectdetails.html?projectId=' + id.projectId + '&operateType=' + 3;
            pWindow.location.hash = 'modules/project/projectdetails.html?projectId=' + id.projectId + '&operateType=' + 3;
        }
	},
    created: function () {
        this.getInfo();
    }
});